package com.level2app.adapter;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.QuickViewHolder;
import com.level2app.R;
import com.level2app.utils.ToastHelper;

/*
 * Author: S
 * Date: 2024/9/5
 */public class RecentHistoryAddressAdapter extends BaseQuickAdapter<String, QuickViewHolder> {

    @Override
    protected void onBindViewHolder(@NonNull QuickViewHolder holder, int i, @Nullable String bean) {
        holder.setText(R.id.addressTv, "1226 University Drive");
        holder.setText(R.id.detailsAddressTv, "Menlo Park, CA, USA");
//        ImageView editIv = holder.getView(R.id.editIv);
//        editIv.setOnClickListener(new View.OnClickListener() {
//            @Override
//            public void onClick(View view) {
//                ToastHelper.showToast("点它是编辑啥啊");
//            }
//        });
    }

    @NonNull
    @Override
    protected QuickViewHolder onCreateViewHolder(@NonNull Context context, @NonNull ViewGroup viewGroup, int i) {
        return new QuickViewHolder(R.layout.item_recent_history_address, viewGroup);
    }
}